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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.w: E = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: C = None
        self.p: B = None
        self.y: B = None
        self.s: G = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.w: E = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: C = None
        self.p: B = None
        self.y: B = None
        self.s: G = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

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

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

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

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