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

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

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

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

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

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

h = A("h")
f = B("f")
a = C("a")
d = D("d")
j = E("j")
c = F("c")
b = E("b")
e = F("e")
i = B("i")
l = F("l")

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

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

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

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

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

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

h = A("h")
f = B("f")
a = C("a")
d = D("d")
j = E("j")
c = F("c")
b = E("b")
e = F("e")
i = B("i")
l = F("l")

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