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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: J = None
        self.r: F = None
        self.p: E = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.z: C = None
        self.s: H = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: I = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: J = None
        self.r: F = None
        self.p: E = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.z: C = None
        self.s: H = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: I = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

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

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