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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: E = None
        self.v: F = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: A = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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