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

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.y: F = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.o: F = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.y: F = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.o: F = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

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