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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.o: H = None
        self.t: E = None
        self.q: E = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.q: E = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.o: H = None
        self.t: E = None
        self.q: E = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.q: E = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

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

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

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