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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.r: G = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.p: G = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.p: H = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.t: F = None
        self.z: I = None
        self.u: A = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: D = None
        self.r: G = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.p: G = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: B = None
        self.p: H = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.t: F = None
        self.z: I = None
        self.u: A = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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