class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: F = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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