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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.z: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.w: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.z: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.w: D = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

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