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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.o: B = None
        self.s: A = None
        self.w: B = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.z: G = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: E = None
        self.o: B = None
        self.s: A = None
        self.w: B = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: F = None
        self.z: G = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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