class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: I = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: I = None
        self.y: I = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.x: I = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: I = None
        self.y: I = None
        self.x: G = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.x: I = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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