class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.v: D = None
        self.x: E = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.q: C = None
        self.y: B = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.q: C = None
        self.y: B = None
        self.s: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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