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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: I = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: A = None
        self.u: E = None
        self.s: D = None
        self.x: B = None
        self.z: A = None
        self.r: I = None
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: I = None
        self.z: A = None
        self.s: G = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: A = None
        self.v: F = None
        self.o: A = None
        self.r: G = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: I = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: A = None
        self.u: E = None
        self.s: D = None
        self.x: B = None
        self.z: A = None
        self.r: I = None
        self.q: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: I = None
        self.z: A = None
        self.s: G = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: A = None
        self.v: F = None
        self.o: A = None
        self.r: G = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: E = None
        self.w: H = None
        self.txt = txt

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

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