class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.q: D = None
        self.p: F = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.p: E = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.p: E = None
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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