class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.o: H = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.v: D = None
        self.w: H = None
        self.q: H = None
        self.u: H = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

g = A("g")
c = B("c")
i = C("i")
e = D("e")
l = E("l")
k = F("k")
m = G("m")
j = H("j")
d = A("d")

g.x = d
g.v = m
g.w = k
c.r = m
c.v = i
c.s = i
i.u = d
e.x = d
e.r = k
l.q = g
l.p = c
l.o = j
l.u = e
l.w = e
k.y = j
m.z = l
m.t = j
m.w = j
m.q = j
m.u = j
m.v = e
m.p = k
m.r = k
j.o = k
d.x = g
d.v = m
d.w = k
assert g.v.v.x.w.y.o.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.o: H = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.v: D = None
        self.w: H = None
        self.q: H = None
        self.u: H = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

g = A("g")
c = B("c")
i = C("i")
e = D("e")
l = E("l")
k = F("k")
m = G("m")
j = H("j")
d = A("d")

g.x = d
g.v = m
g.w = k
c.r = m
c.v = i
c.s = i
i.u = d
e.x = d
e.r = k
l.q = g
l.p = c
l.o = j
l.u = e
l.w = e
k.y = j
m.z = l
m.t = j
m.w = j
m.q = j
m.u = j
m.v = e
m.p = k
m.r = k
j.o = k
d.x = g
d.v = m
d.w = k
assert g.v.v.x.w.y.o.y.o.txt == "k"