class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.y: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: E = None
        self.x: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

i = A("i")
h = B("h")
b = C("b")
d = D("d")
j = E("j")
e = F("e")
g = G("g")
k = H("k")
l = C("l")

i.x = k
i.t = k
i.p = l
i.z = e
h.u = g
h.t = k
b.u = g
b.w = j
d.y = j
j.x = l
j.s = h
e.w = k
e.s = k
e.y = b
e.o = d
g.z = d
g.q = j
g.x = k
g.y = i
k.u = i
k.w = g
k.r = e
l.u = g
l.w = j
assert d.y.x.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: C = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.y: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: E = None
        self.x: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

i = A("i")
h = B("h")
b = C("b")
d = D("d")
j = E("j")
e = F("e")
g = G("g")
k = H("k")
l = C("l")

i.x = k
i.t = k
i.p = l
i.z = e
h.u = g
h.t = k
b.u = g
b.w = j
d.y = j
j.x = l
j.s = h
e.w = k
e.s = k
e.y = b
e.o = d
g.z = d
g.q = j
g.x = k
g.y = i
k.u = i
k.w = g
k.r = e
l.u = g
l.w = j
assert d.y.x.w.s.txt == "h"