class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: B = None
        self.w: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: B = None
        self.x: F = None
        self.s: B = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.u: F = None
        self.p: C = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: B = None
        self.w: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: B = None
        self.x: F = None
        self.s: B = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.u: F = None
        self.p: C = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

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

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

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