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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.u: E = None
        self.v: I = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: C = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.z: C = None
        self.s: G = None
        self.v: E = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.s: B = None
        self.u: C = None
        self.q: E = None
        self.r: A = None
        self.v: C = None
        self.z: D = None
        self.txt = txt

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

h.r = l
f.v = j
f.r = m
f.z = c
f.x = c
f.y = l
f.o = l
f.u = k
m.w = a
m.u = a
m.p = h
m.v = n
m.z = c
m.q = c
k.o = n
k.u = m
k.q = h
k.z = l
a.z = n
l.r = c
l.y = c
l.o = h
l.w = k
c.p = a
c.y = h
c.t = f
j.r = h
j.p = m
j.z = m
j.s = c
j.v = a
j.w = k
n.o = j
n.p = f
n.s = f
n.u = m
n.v = m
n.q = a
n.r = h
n.z = k
assert h.r.r.y.r.o.r.o.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.u: E = None
        self.v: I = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: C = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.z: C = None
        self.s: G = None
        self.v: E = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: B = None
        self.s: B = None
        self.u: C = None
        self.q: E = None
        self.r: A = None
        self.v: C = None
        self.z: D = None
        self.txt = txt

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

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