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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.p: A = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.p: A = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

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