class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.x: C = None
        self.s: B = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: B = None
        self.txt = txt

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

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

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