class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.q: D = None
        self.s: D = None
        self.x: B = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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