class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.v: B = None
        self.t: H = None
        self.p: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.q: C = None
        self.x: I = None
        self.t: B = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.q: C = None
        self.x: I = None
        self.t: B = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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