class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.q: A = None
        self.y: D = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.t: D = None
        self.p: B = None
        self.u: G = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.o: F = None
        self.y: C = None
        self.v: E = None
        self.q: C = None
        self.z: C = None
        self.txt = txt

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

e = A("e")
c = B("c")
h = C("h")
b = D("b")
l = E("l")
g = F("g")
m = G("m")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.q: A = None
        self.y: D = None
        self.t: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.t: D = None
        self.p: B = None
        self.u: G = None
        self.r: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.o: F = None
        self.y: C = None
        self.v: E = None
        self.q: C = None
        self.z: C = None
        self.txt = txt

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

e = A("e")
c = B("c")
h = C("h")
b = D("b")
l = E("l")
g = F("g")
m = G("m")
f = F("f")

e.u = g
c.x = m
c.p = g
c.q = e
c.y = b
c.t = f
h.q = m
h.y = b
h.z = b
h.o = g
b.v = f
b.o = f
l.z = b
l.s = b
l.t = b
l.p = c
l.u = m
l.r = h
l.q = e
g.w = m
g.t = l
g.v = l
g.o = f
g.y = h
g.q = h
g.z = h
m.w = e
m.o = b
m.s = b
m.z = c
f.w = m
f.t = l
f.v = l
f.o = g
f.y = h
f.q = h
f.z = h
assert c.q.u.o.y.q.z.y.v.txt == "f"