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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: B = None
        self.txt = txt

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

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