class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: D = None
        self.v: F = None
        self.p: I = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: C = None
        self.s: I = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: C = None
        self.s: I = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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