class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.v: F = None
        self.s: E = None
        self.r: H = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.txt = txt

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

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