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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: C = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: G = None
        self.o: I = None
        self.z: B = None
        self.u: E = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.z: A = None
        self.v: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: C = None
        self.v: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: G = None
        self.o: I = None
        self.z: B = None
        self.u: E = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: F = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.z: A = None
        self.v: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.txt = txt

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

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