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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.x: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.x: C = None
        self.o: A = None
        self.txt = txt

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

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

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