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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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