class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.p: A = None
        self.u: H = None
        self.y: F = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: D = None
        self.r: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.o: D = None
        self.z: C = None
        self.r: G = None
        self.y: C = None
        self.t: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

b.q = g
b.y = g
b.r = h
b.p = k
b.w = k
b.u = c
b.s = d
d.u = e
e.o = f
e.z = n
e.r = n
e.q = h
n.u = h
n.p = d
n.y = k
n.s = k
n.q = f
f.y = n
f.s = d
f.v = e
f.p = e
g.s = n
g.o = n
g.q = b
g.z = e
g.y = e
g.r = h
g.t = f
g.p = f
h.q = d
c.t = h
c.p = h
c.o = b
c.w = g
m.t = h
m.p = h
m.o = k
m.w = g
k.q = g
k.y = g
k.r = h
k.p = b
k.w = b
k.u = c
k.s = d
assert e.o.v.r.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: G = None
        self.p: A = None
        self.u: H = None
        self.y: F = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: D = None
        self.r: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.o: D = None
        self.z: C = None
        self.r: G = None
        self.y: C = None
        self.t: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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