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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.w: G = None
        self.y: A = None
        self.p: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.o: F = None
        self.t: A = None
        self.x: I = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.y: F = None
        self.q: I = None
        self.u: I = None
        self.s: F = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.p: E = None
        self.z: B = None
        self.y: B = None
        self.u: H = None
        self.s: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.w: G = None
        self.y: A = None
        self.p: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: H = None
        self.o: F = None
        self.t: A = None
        self.x: I = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: I = None
        self.y: F = None
        self.q: I = None
        self.u: I = None
        self.s: F = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.p: E = None
        self.z: B = None
        self.y: B = None
        self.u: H = None
        self.s: B = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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