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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: F = None
        self.z: G = None
        self.t: E = None
        self.w: G = None
        self.p: C = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: D = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: F = None
        self.z: G = None
        self.t: E = None
        self.w: G = None
        self.p: C = None
        self.o: G = None
        self.txt = txt

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

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