class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.s: I = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.w: C = None
        self.x: C = None
        self.r: F = None
        self.u: C = None
        self.o: B = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.w: C = None
        self.x: C = None
        self.r: F = None
        self.u: C = None
        self.o: B = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: A = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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