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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.q: H = None
        self.r: I = None
        self.x: G = None
        self.w: E = None
        self.z: H = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.q: H = None
        self.r: I = None
        self.x: G = None
        self.w: E = None
        self.z: H = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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