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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.o: E = None
        self.y: C = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.o: E = None
        self.y: C = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

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

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