class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: F = None
        self.t: D = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: I = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: I = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

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