class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.u: A = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.u: A = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

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

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