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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.p: I = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: E = None
        self.x: B = None
        self.q: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.w: A = None
        self.r: A = None
        self.u: A = None
        self.y: I = None
        self.t: A = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.o: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.y: F = None
        self.s: H = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.p: I = None
        self.z: H = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: E = None
        self.x: B = None
        self.q: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: E = None
        self.w: A = None
        self.r: A = None
        self.u: A = None
        self.y: I = None
        self.t: A = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.o: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.y: F = None
        self.s: H = None
        self.u: H = None
        self.txt = txt

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

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