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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: G = None
        self.p: E = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.t: A = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: B = None
        self.x: F = None
        self.y: F = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: G = None
        self.p: E = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.t: A = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: B = None
        self.x: F = None
        self.y: F = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

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

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

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