class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.w: C = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.p: D = None
        self.t: B = None
        self.o: A = None
        self.s: D = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: E = None
        self.y: B = None
        self.r: F = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.w: C = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.p: D = None
        self.t: B = None
        self.o: A = None
        self.s: D = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: E = None
        self.y: B = None
        self.r: F = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

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

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