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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.y: F = None
        self.v: C = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.y: F = None
        self.v: C = None
        self.x: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.z: D = None
        self.txt = txt

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

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