class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: H = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.w: I = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: J = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: H = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.w: I = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: J = None
        self.p: I = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.q: H = None
        self.txt = txt

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

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