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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.x: H = None
        self.s: A = None
        self.w: G = None
        self.u: H = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.x: H = None
        self.s: A = None
        self.w: G = None
        self.u: H = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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