class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: I = None
        self.p: C = None
        self.s: D = None
        self.o: D = None
        self.x: F = None
        self.r: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: B = None
        self.w: F = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: H = None
        self.s: A = None
        self.w: D = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.p: D = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: E = None
        self.t: I = None
        self.txt = txt

a = A("a")
h = B("h")
g = C("g")
k = D("k")
d = E("d")
e = F("e")
j = G("j")
c = H("c")
i = I("i")
l = J("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: B = None
        self.w: F = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: H = None
        self.s: A = None
        self.w: D = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: H = None
        self.p: D = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: E = None
        self.t: I = None
        self.txt = txt

a = A("a")
h = B("h")
g = C("g")
k = D("k")
d = E("d")
e = F("e")
j = G("j")
c = H("c")
i = I("i")
l = J("l")

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