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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.q: G = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.z: D = None
        self.o: G = None
        self.u: E = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.q: G = None
        self.r: E = None
        self.x: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.z: D = None
        self.o: G = None
        self.u: E = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

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

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

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

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