class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.z: B = None
        self.u: A = None
        self.x: F = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.y: G = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.w: F = None
        self.x: H = None
        self.y: F = None
        self.t: C = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.p: A = None
        self.v: G = None
        self.y: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

f = A("f")
a = B("a")
e = C("e")
m = D("m")
h = E("h")
c = F("c")
k = G("k")
d = H("d")
g = I("g")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.z: B = None
        self.u: A = None
        self.x: F = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.y: G = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.w: F = None
        self.x: H = None
        self.y: F = None
        self.t: C = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.p: A = None
        self.v: G = None
        self.y: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

f = A("f")
a = B("a")
e = C("e")
m = D("m")
h = E("h")
c = F("c")
k = G("k")
d = H("d")
g = I("g")
j = J("j")

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