class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.v: I = None
        self.u: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.u: G = None
        self.s: I = None
        self.x: I = None
        self.v: E = None
        self.z: A = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: D = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.u: G = None
        self.s: I = None
        self.x: I = None
        self.v: E = None
        self.z: A = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: A = None
        self.txt = txt

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

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