class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.x: C = None
        self.v: B = None
        self.o: E = None
        self.w: C = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: E = None
        self.u: G = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: E = None
        self.u: G = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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