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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

b = A("b")
c = B("c")
l = C("l")
i = D("i")
d = E("d")
j = F("j")
m = G("m")
n = C("n")
f = A("f")
a = E("a")

b.t = d
b.r = f
b.v = f
c.z = j
c.y = j
c.t = d
c.w = n
c.q = l
c.r = l
l.v = b
l.s = i
l.o = j
i.r = l
i.z = j
i.q = c
i.s = m
d.o = l
d.q = m
d.u = f
d.z = a
j.p = i
j.s = m
j.o = c
m.s = d
n.v = f
n.s = i
n.o = j
f.t = d
f.r = b
f.v = b
a.o = l
a.q = m
a.u = b
a.z = d
assert l.v.v.r.t.u.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

b = A("b")
c = B("c")
l = C("l")
i = D("i")
d = E("d")
j = F("j")
m = G("m")
n = C("n")
f = A("f")
a = E("a")

b.t = d
b.r = f
b.v = f
c.z = j
c.y = j
c.t = d
c.w = n
c.q = l
c.r = l
l.v = b
l.s = i
l.o = j
i.r = l
i.z = j
i.q = c
i.s = m
d.o = l
d.q = m
d.u = f
d.z = a
j.p = i
j.s = m
j.o = c
m.s = d
n.v = f
n.s = i
n.o = j
f.t = d
f.r = b
f.v = b
a.o = l
a.q = m
a.u = b
a.z = d
assert l.v.v.r.t.u.t.q.txt == "m"