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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.z: E = None
        self.txt = txt

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

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

b.w = a
b.x = e
b.r = i
e.w = i
e.r = i
e.u = i
e.v = c
e.t = j
e.x = k
e.o = b
f.z = k
f.s = i
f.v = e
k.x = i
k.z = f
i.w = a
i.u = k
c.w = f
c.y = j
c.z = i
a.o = k
h.w = f
h.y = b
h.z = i
j.w = a
j.x = e
j.r = i
assert c.z.w.o.z.z.x.u.txt == "k"