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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.o: G = None
        self.q: A = None
        self.s: A = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: G = None
        self.o: G = None
        self.q: A = None
        self.s: A = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

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