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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.p: D = None
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.q: C = None
        self.y: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.p: D = None
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.q: C = None
        self.y: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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