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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.x: H = None
        self.v: F = None
        self.p: A = None
        self.s: F = None
        self.q: C = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.r: C = None
        self.o: B = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.x: C = None
        self.s: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: D = None
        self.u: C = None
        self.y: F = None
        self.r: H = None
        self.x: E = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.x: H = None
        self.v: F = None
        self.p: A = None
        self.s: F = None
        self.q: C = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: B = None
        self.r: C = None
        self.o: B = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.x: C = None
        self.s: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: D = None
        self.u: C = None
        self.y: F = None
        self.r: H = None
        self.x: E = None
        self.z: B = None
        self.txt = txt

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

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