class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.u: B = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
c = C("c")
d = D("d")
m = E("m")
e = F("e")
f = G("f")
k = F("k")
l = F("l")
a = A("a")

h.x = c
h.o = f
h.w = i
i.u = m
c.r = f
d.q = i
d.s = h
d.y = f
d.x = f
d.t = f
d.u = c
d.v = m
m.v = c
m.q = l
m.o = d
e.r = m
e.v = i
e.o = i
e.u = i
e.s = i
e.w = k
f.o = m
f.q = i
f.s = k
f.z = k
f.u = l
f.x = e
f.r = c
k.r = m
k.v = i
k.o = i
k.u = i
k.s = i
k.w = e
l.r = m
l.v = i
l.o = i
l.u = i
l.s = i
l.w = k
a.x = c
a.o = f
a.w = i
assert f.o.o.q.u.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: B = None
        self.o: B = None
        self.u: B = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

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

h = A("h")
i = B("i")
c = C("c")
d = D("d")
m = E("m")
e = F("e")
f = G("f")
k = F("k")
l = F("l")
a = A("a")

h.x = c
h.o = f
h.w = i
i.u = m
c.r = f
d.q = i
d.s = h
d.y = f
d.x = f
d.t = f
d.u = c
d.v = m
m.v = c
m.q = l
m.o = d
e.r = m
e.v = i
e.o = i
e.u = i
e.s = i
e.w = k
f.o = m
f.q = i
f.s = k
f.z = k
f.u = l
f.x = e
f.r = c
k.r = m
k.v = i
k.o = i
k.u = i
k.s = i
k.w = e
l.r = m
l.v = i
l.o = i
l.u = i
l.s = i
l.w = k
a.x = c
a.o = f
a.w = i
assert f.o.o.q.u.v.r.txt == "f"