class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: G = None
        self.u: E = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.u: I = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: H = None
        self.q: C = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: G = None
        self.u: E = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.u: I = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: H = None
        self.q: C = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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