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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: I = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.t: E = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: I = None
        self.r: F = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: F = None
        self.t: E = None
        self.o: I = None
        self.txt = txt

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

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

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

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