class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.y: E = None
        self.x: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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