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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.v: A = None
        self.o: A = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.v: A = None
        self.o: A = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.s: D = None
        self.txt = txt

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

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