class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: D = None
        self.t: E = None
        self.u: D = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

h.y = a
h.o = a
h.u = a
h.t = i
h.w = i
m.r = a
m.y = h
m.q = i
m.s = f
m.w = f
e.w = a
e.p = i
a.o = m
a.q = h
i.w = m
i.u = k
i.y = f
i.r = a
i.q = a
f.u = e
f.t = a
f.v = i
f.z = m
f.r = m
f.y = m
f.q = h
k.p = a
k.q = f
g.w = a
g.p = i
assert f.q.t.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: D = None
        self.t: E = None
        self.u: D = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

h.y = a
h.o = a
h.u = a
h.t = i
h.w = i
m.r = a
m.y = h
m.q = i
m.s = f
m.w = f
e.w = a
e.p = i
a.o = m
a.q = h
i.w = m
i.u = k
i.y = f
i.r = a
i.q = a
f.u = e
f.t = a
f.v = i
f.z = m
f.r = m
f.y = m
f.q = h
k.p = a
k.q = f
g.w = a
g.p = i
assert f.q.t.y.t.o.txt == "m"