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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.t: C = None
        self.z: B = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.q: B = None
        self.s: F = None
        self.t: B = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: G = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.t: C = None
        self.z: B = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: B = None
        self.q: B = None
        self.s: F = None
        self.t: B = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: G = None
        self.s: B = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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