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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.w: C = None
        self.x: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: B = None
        self.q: B = None
        self.r: B = None
        self.w: G = None
        self.y: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.o: A = None
        self.t: F = None
        self.v: F = None
        self.r: A = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.p: C = None
        self.x: B = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

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

k.u = e
k.x = j
k.v = a
a.p = k
a.x = k
a.u = e
a.w = f
a.y = b
f.w = a
f.t = e
f.s = e
j.u = f
j.y = f
j.o = a
j.q = a
j.r = a
j.w = n
j.v = n
e.s = b
e.t = b
e.v = b
e.p = f
e.w = f
e.o = k
e.r = k
b.s = a
b.u = f
b.y = j
b.r = j
n.r = e
n.o = j
n.p = f
n.x = a
n.w = a
n.t = a
assert j.v.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.w: C = None
        self.x: A = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: B = None
        self.q: B = None
        self.r: B = None
        self.w: G = None
        self.y: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.o: A = None
        self.t: F = None
        self.v: F = None
        self.r: A = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.p: C = None
        self.x: B = None
        self.w: B = None
        self.t: B = None
        self.txt = txt

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

k.u = e
k.x = j
k.v = a
a.p = k
a.x = k
a.u = e
a.w = f
a.y = b
f.w = a
f.t = e
f.s = e
j.u = f
j.y = f
j.o = a
j.q = a
j.r = a
j.w = n
j.v = n
e.s = b
e.t = b
e.v = b
e.p = f
e.w = f
e.o = k
e.r = k
b.s = a
b.u = f
b.y = j
b.r = j
n.r = e
n.o = j
n.p = f
n.x = a
n.w = a
n.t = a
assert j.v.r.v.txt == "b"