class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.t: B = None
        self.r: B = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.t: F = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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