class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.p: G = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.r: I = None
        self.w: C = None
        self.q: I = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.r: D = None
        self.s: A = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: C = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.r: I = None
        self.w: C = None
        self.q: I = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.r: D = None
        self.s: A = None
        self.p: D = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: C = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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