class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.s: E = None
        self.q: B = None
        self.p: C = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.v: F = None
        self.p: E = None
        self.r: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.w: J = None
        self.o: J = None
        self.r: I = None
        self.p: E = None
        self.q: E = None
        self.v: E = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.v: F = None
        self.p: E = None
        self.r: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.w: J = None
        self.o: J = None
        self.r: I = None
        self.p: E = None
        self.q: E = None
        self.v: E = None
        self.t: J = None
        self.u: I = None
        self.txt = txt

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

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

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

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