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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.p: I = None
        self.o: A = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.o: F = None
        self.v: B = None
        self.z: D = None
        self.q: I = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: D = None
        self.p: B = None
        self.u: I = None
        self.r: H = None
        self.x: A = None
        self.t: D = None
        self.z: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: D = None
        self.p: I = None
        self.o: A = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.o: F = None
        self.v: B = None
        self.z: D = None
        self.q: I = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: D = None
        self.p: B = None
        self.u: I = None
        self.r: H = None
        self.x: A = None
        self.t: D = None
        self.z: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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