class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: D = None
        self.p: D = None
        self.s: H = None
        self.w: H = None
        self.y: H = None
        self.v: C = None
        self.o: C = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.p: D = None
        self.v: J = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.x: B = None
        self.r: J = None
        self.q: F = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: D = None
        self.p: D = None
        self.s: H = None
        self.w: H = None
        self.y: H = None
        self.v: C = None
        self.o: C = None
        self.u: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: A = None
        self.p: D = None
        self.v: J = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.x: B = None
        self.r: J = None
        self.q: F = None
        self.z: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.txt = txt

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

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