class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: C = None
        self.x: D = None
        self.u: H = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.u: F = None
        self.v: A = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.u: F = None
        self.v: A = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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