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

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

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

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

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

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

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

b = A("b")
a = B("a")
k = C("k")
i = D("i")
l = E("l")
n = F("n")
g = G("g")
e = F("e")

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

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

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

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

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

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

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

b = A("b")
a = B("a")
k = C("k")
i = D("i")
l = E("l")
n = F("n")
g = G("g")
e = F("e")

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