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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.t: A = None
        self.o: D = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.o: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
c = D("c")
i = E("i")
g = F("g")
f = G("f")
h = B("h")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.t: A = None
        self.o: D = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.o: B = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

e = A("e")
j = B("j")
d = C("d")
c = D("c")
i = E("i")
g = F("g")
f = G("f")
h = B("h")
k = D("k")

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