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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.v: H = None
        self.r: H = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.v: H = None
        self.r: H = None
        self.y: C = None
        self.x: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: A = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: H = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

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

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

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