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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.p: E = None
        self.w: B = None
        self.o: C = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.p: E = None
        self.w: B = None
        self.o: C = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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