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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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