class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.p: C = None
        self.r: G = None
        self.t: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: F = None
        self.x: G = None
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

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

l.w = m
l.z = k
l.t = k
l.p = f
l.r = h
l.y = d
k.p = m
f.p = h
f.y = l
f.q = m
f.x = j
f.v = n
f.t = d
m.w = j
j.z = n
j.w = n
j.q = n
j.o = b
j.x = h
b.u = j
h.q = m
h.z = b
h.r = b
h.x = j
h.p = l
h.t = f
d.p = b
d.q = b
n.x = d
n.z = f
assert n.z.y.t.p.w.o.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.p: C = None
        self.r: G = None
        self.t: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: F = None
        self.x: G = None
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

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

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