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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: F = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: I = None
        self.v: E = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: F = None
        self.u: G = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: I = None
        self.v: E = None
        self.p: I = None
        self.txt = txt

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

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

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

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