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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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