class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: B = None
        self.u: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

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

e = A("e")
d = B("d")
c = C("c")
l = D("l")
h = E("h")
f = F("f")
k = C("k")
a = F("a")
g = A("g")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: B = None
        self.u: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

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

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

e = A("e")
d = B("d")
c = C("c")
l = D("l")
h = E("h")
f = F("f")
k = C("k")
a = F("a")
g = A("g")

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