class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: C = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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