class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.v: C = None
        self.w: A = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.x: B = None
        self.y: A = None
        self.z: E = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

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

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

i = A("i")
h = B("h")
b = C("b")
n = D("n")
j = E("j")
d = F("d")
l = G("l")
a = A("a")

i.t = a
i.w = a
i.r = a
i.y = l
i.v = b
i.x = n
h.z = n
h.t = l
b.u = j
b.z = j
b.q = d
b.v = d
b.x = h
b.y = a
b.s = a
n.x = d
n.p = i
n.y = b
j.y = n
j.v = b
d.v = n
l.w = a
l.y = j
a.t = i
a.w = i
a.r = i
a.y = l
a.v = b
a.x = n
assert d.v.y.z.v.x.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.v: C = None
        self.w: A = None
        self.x: D = None
        self.r: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: F = None
        self.x: B = None
        self.y: A = None
        self.z: E = None
        self.v: F = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

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

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

i = A("i")
h = B("h")
b = C("b")
n = D("n")
j = E("j")
d = F("d")
l = G("l")
a = A("a")

i.t = a
i.w = a
i.r = a
i.y = l
i.v = b
i.x = n
h.z = n
h.t = l
b.u = j
b.z = j
b.q = d
b.v = d
b.x = h
b.y = a
b.s = a
n.x = d
n.p = i
n.y = b
j.y = n
j.v = b
d.v = n
l.w = a
l.y = j
a.t = i
a.w = i
a.r = i
a.y = l
a.v = b
a.x = n
assert d.v.y.z.v.x.z.y.txt == "b"