class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: E = None
        self.v: D = None
        self.r: D = None
        self.u: C = None
        self.z: G = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: H = None
        self.p: I = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: I = None
        self.v: G = None
        self.x: I = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.r: D = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

j = A("j")
m = B("m")
h = C("h")
i = D("i")
c = E("c")
e = F("e")
d = G("d")
g = H("g")
l = I("l")

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: H = None
        self.p: I = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: I = None
        self.v: G = None
        self.x: I = None
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: D = None
        self.r: D = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

j = A("j")
m = B("m")
h = C("h")
i = D("i")
c = E("c")
e = F("e")
d = G("d")
g = H("g")
l = I("l")

j.y = i
j.v = i
j.r = i
j.s = c
j.u = h
j.z = d
j.t = g
j.p = e
m.s = e
h.r = m
h.z = g
h.p = l
h.w = i
i.z = e
i.u = c
c.q = j
c.y = d
c.v = h
e.q = c
e.w = c
e.r = l
e.x = l
e.v = d
e.y = d
d.q = h
g.r = m
l.w = g
l.t = i
l.r = i
l.x = i
l.y = e
assert j.v.u.v.w.u.y.txt == "d"