class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: H = None
        self.x: D = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.v: I = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.u: D = None
        self.w: E = None
        self.x: H = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.z: B = None
        self.q: F = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.v: I = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.u: D = None
        self.w: E = None
        self.x: H = None
        self.r: B = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.z: B = None
        self.q: F = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

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