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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.z: I = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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