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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.y: C = None
        self.u: G = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: E = None
        self.y: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.y: C = None
        self.u: G = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.x: A = None
        self.p: D = None
        self.txt = txt

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

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