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

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

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

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

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

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

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

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

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

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

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

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

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

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

i.y = c
k.w = c
k.z = c
k.t = c
k.s = j
k.y = i
k.v = i
g.u = c
g.y = c
g.o = j
g.q = k
g.s = i
g.x = i
j.v = c
j.o = k
j.q = k
j.u = i
n.o = g
n.q = i
n.u = j
c.y = k
c.u = g
assert i.y.u.s.y.txt == "c"