class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.u: B = None
        self.z: E = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.w: F = None
        self.r: B = None
        self.q: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.q: D = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

b = A("b")
k = B("k")
g = C("g")
j = D("j")
e = E("e")
i = F("i")

b.y = e
b.z = e
b.w = e
b.r = j
b.u = k
b.o = g
k.y = j
k.t = j
k.v = i
g.z = b
g.o = b
g.w = i
g.t = i
g.r = k
g.q = k
j.y = e
e.p = k
e.y = k
e.x = k
e.q = j
e.z = i
i.r = j
i.w = b
i.z = g
assert k.y.y.q.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.u: B = None
        self.z: E = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.w: F = None
        self.r: B = None
        self.q: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.q: D = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

b = A("b")
k = B("k")
g = C("g")
j = D("j")
e = E("e")
i = F("i")

b.y = e
b.z = e
b.w = e
b.r = j
b.u = k
b.o = g
k.y = j
k.t = j
k.v = i
g.z = b
g.o = b
g.w = i
g.t = i
g.r = k
g.q = k
j.y = e
e.p = k
e.y = k
e.x = k
e.q = j
e.z = i
i.r = j
i.w = b
i.z = g
assert k.y.y.q.y.q.txt == "j"