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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: H = None
        self.z: C = None
        self.t: G = None
        self.o: F = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.u: H = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: H = None
        self.z: C = None
        self.t: G = None
        self.o: F = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.u: H = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

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

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