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

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

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

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

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

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

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

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

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

d = A("d")
l = B("l")
c = C("c")
n = D("n")
j = E("j")
e = F("e")
b = G("b")
g = H("g")
m = I("m")
i = C("i")

d.s = b
l.v = c
l.r = e
c.y = i
c.t = e
n.y = g
j.o = d
j.u = c
e.r = i
e.o = n
e.s = d
b.w = g
b.q = g
b.v = j
b.x = j
g.z = c
m.o = e
m.p = i
m.u = i
m.r = l
m.y = b
m.t = n
m.v = j
i.y = c
i.t = e
assert m.y.q.z.t.o.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

d = A("d")
l = B("l")
c = C("c")
n = D("n")
j = E("j")
e = F("e")
b = G("b")
g = H("g")
m = I("m")
i = C("i")

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