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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.v: C = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

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

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

n.x = e
n.s = e
n.o = h
n.u = l
b.y = i
b.s = j
b.r = h
b.p = l
l.q = b
l.v = h
i.t = h
i.s = e
f.p = l
f.z = n
f.y = n
f.v = j
f.t = h
d.p = l
j.q = b
j.v = f
e.x = n
e.s = n
e.o = f
e.u = j
h.p = l
h.v = l
h.z = n
h.y = n
h.t = f
assert h.t.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: E = None
        self.s: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.v: C = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

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

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

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