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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: A = None
        self.v: G = None
        self.o: B = None
        self.w: B = None
        self.r: B = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.y: I = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: A = None
        self.v: G = None
        self.o: B = None
        self.w: B = None
        self.r: B = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: D = None
        self.y: I = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.txt = txt

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

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