class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: D = None
        self.u: F = None
        self.q: F = None
        self.t: B = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.p: F = None
        self.z: G = None
        self.y: B = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.x: F = None
        self.r: E = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.p: F = None
        self.z: G = None
        self.y: B = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.x: F = None
        self.r: E = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

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

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