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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: H = None
        self.p: F = None
        self.w: D = None
        self.z: D = None
        self.y: I = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.v: D = None
        self.p: G = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: H = None
        self.p: F = None
        self.w: D = None
        self.z: D = None
        self.y: I = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.v: D = None
        self.p: G = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

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

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