class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: B = None
        self.x: C = None
        self.q: F = None
        self.s: B = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.t: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.v: A = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

g = A("g")
c = B("c")
k = C("k")
d = D("d")
b = E("b")
l = F("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.t: F = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.v: A = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

g = A("g")
c = B("c")
k = C("k")
d = D("d")
b = E("b")
l = F("l")

g.o = b
g.p = b
g.y = c
g.s = c
g.x = k
g.q = l
c.t = k
k.u = c
k.w = b
d.r = l
d.x = b
d.p = b
d.q = c
b.o = k
b.x = k
b.r = d
b.p = d
b.t = l
l.r = c
l.w = c
l.s = b
l.v = g
l.t = k
assert c.t.w.x.u.t.u.txt == "c"