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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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