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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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