class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.x: F = None
        self.u: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

e = A("e")
l = B("l")
g = C("g")
j = D("j")
n = E("n")
c = F("c")

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

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

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

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

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

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

e = A("e")
l = B("l")
g = C("g")
j = D("j")
n = E("n")
c = F("c")

e.r = n
e.u = n
e.q = g
e.t = g
e.x = c
l.v = j
l.q = n
l.r = e
l.u = e
l.z = g
g.u = j
g.o = c
j.w = e
j.o = l
j.s = l
j.r = c
n.r = j
n.u = j
n.y = c
n.w = l
n.v = e
n.z = e
c.z = n
c.t = l
c.r = g
assert j.w.t.o.txt == "c"