class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.v: C = None
        self.x: A = None
        self.p: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: C = None
        self.o: D = None
        self.r: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: C = None
        self.o: D = None
        self.r: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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