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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: G = None
        self.q: D = None
        self.y: H = None
        self.o: G = None
        self.s: I = None
        self.v: E = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.s: C = None
        self.q: H = None
        self.t: G = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: G = None
        self.q: D = None
        self.y: H = None
        self.o: G = None
        self.s: I = None
        self.v: E = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.s: C = None
        self.q: H = None
        self.t: G = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

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

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