class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: I = None
        self.v: F = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.v: H = None
        self.o: D = None
        self.s: C = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: H = None
        self.p: H = None
        self.x: G = None
        self.w: B = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: H = None
        self.v: H = None
        self.o: D = None
        self.s: C = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: H = None
        self.p: H = None
        self.x: G = None
        self.w: B = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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