class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.y: G = None
        self.q: I = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.p: E = None
        self.u: I = None
        self.z: F = None
        self.v: E = None
        self.y: E = None
        self.o: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: B = None
        self.t: E = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.y: G = None
        self.q: I = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.p: E = None
        self.u: I = None
        self.z: F = None
        self.v: E = None
        self.y: E = None
        self.o: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: B = None
        self.t: E = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.u: H = None
        self.r: A = None
        self.txt = txt

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

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