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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: J = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: J = None
        self.w: F = None
        self.y: B = None
        self.q: G = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: J = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: J = None
        self.w: F = None
        self.y: B = None
        self.q: G = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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