class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.s: E = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.r: A = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.r: A = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

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

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

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