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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.t: A = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.q: B = None
        self.w: E = None
        self.u: D = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.o: G = None
        self.t: E = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

a = A("a")
j = B("j")
h = C("h")
d = D("d")
g = E("g")
e = F("e")
i = G("i")
m = G("m")
n = B("n")
l = D("l")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.t: A = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.q: B = None
        self.w: E = None
        self.u: D = None
        self.p: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.o: G = None
        self.t: E = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

a = A("a")
j = B("j")
h = C("h")
d = D("d")
g = E("g")
e = F("e")
i = G("i")
m = G("m")
n = B("n")
l = D("l")

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