class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.v: H = None
        self.w: D = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.x: I = None
        self.z: G = None
        self.u: I = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.y: H = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.o: A = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.v: C = None
        self.o: E = None
        self.u: I = None
        self.x: C = None
        self.q: G = None
        self.txt = txt

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

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

a.r = g
a.v = g
a.o = l
a.w = k
a.u = i
a.y = i
n.t = k
n.r = i
n.x = m
n.u = m
n.v = m
n.w = m
n.z = c
l.t = k
l.y = n
k.u = i
k.r = g
k.y = g
k.w = l
k.p = n
i.p = a
i.o = a
i.q = c
i.x = n
i.u = g
h.v = g
h.s = l
h.q = l
h.y = l
h.t = i
h.o = c
h.r = c
h.p = m
c.s = m
g.w = k
g.p = c
g.q = c
g.v = l
g.x = l
g.o = i
g.u = m
m.t = k
m.q = k
m.r = c
m.y = h
m.p = n
m.u = a
m.x = a
m.w = a
assert h.r.s.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.v: H = None
        self.w: D = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.x: I = None
        self.z: G = None
        self.u: I = None
        self.v: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: H = None
        self.y: H = None
        self.w: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.o: A = None
        self.x: B = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.v: C = None
        self.o: E = None
        self.u: I = None
        self.x: C = None
        self.q: G = None
        self.txt = txt

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

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

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