class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: E = None
        self.q: I = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: E = None
        self.q: I = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

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

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

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